home *** CD-ROM | disk | FTP | other *** search
/ Micromanía: 150 Juegos 2010 / 150Juegos_16.iso / Shareware / Shape Smash / shape-smash.swf / scripts / Code / LIB / _se17.as < prev    next >
Encoding:
Text File  |  2010-05-14  |  5.9 KB  |  188 lines

  1. package Code.LIB
  2. {
  3.    import Code.LIB.SOUND._bu111;
  4.    import Code.OPTIONS._gs337;
  5.    import flash.display.Sprite;
  6.    import flash.events.Event;
  7.    import flash.text.TextField;
  8.    import flash.text.TextFormat;
  9.    import flash.utils.getTimer;
  10.    
  11.    public class _se17 extends _be548
  12.    {
  13.       public var menuItem:int = -1;
  14.       
  15.       private var iTimer:int;
  16.       
  17.       protected var speakerMount:_oo505;
  18.       
  19.       protected var iBackground:_oo505;
  20.       
  21.       private var iFrame:_oo505;
  22.       
  23.       private var iDebugTextFormat:TextFormat;
  24.       
  25.       private var iDebugText:TextField;
  26.       
  27.       protected var iWindow:_gt710;
  28.       
  29.       public function _se17()
  30.       {
  31.          var _loc1_:Sprite = null;
  32.          menuItem = -1;
  33.          iTimer = getTimer();
  34.          super();
  35.          _rs402._be412();
  36.          _bu111._pp317(_gs337._bu111);
  37.          _loc1_ = new _gs337.TButtonMount();
  38.          _loc1_.scaleX = 70 / 200;
  39.          _loc1_.scaleY = 36 / 100;
  40.          _loc1_.alpha = 0.4;
  41.          speakerMount = _tk11._ln87(_loc1_);
  42.          speakerMount._xe768(564,5);
  43.          if(_rs402.iDebug)
  44.          {
  45.             iDebugText = new TextField();
  46.             iDebugTextFormat = new TextFormat(null,20,16777215);
  47.             iDebugText.x = 30;
  48.             super.addChild(iDebugText);
  49.          }
  50.          _cg33._pp317();
  51.          if(!_cg33._ss555)
  52.          {
  53.             _bu111._yt336 = 0.6;
  54.             _bu111._uk57 = 0.9;
  55.          }
  56.          else
  57.          {
  58.             _bu111._yt336 = _cg33._ss555[1].prMVolume;
  59.             _bu111._uk57 = _cg33._ss555[1].prSVolume;
  60.          }
  61.          this.addEventListener(Event.ENTER_FRAME,onEnterFrame);
  62.          _rs402.prStage.addEventListener(Event.RESIZE,onResize);
  63.          iFrame = new _oo505();
  64.          addChild(iFrame);
  65.       }
  66.       
  67.       protected function _vc572() : void
  68.       {
  69.          var _loc1_:Sprite = null;
  70.          if(iBackground)
  71.          {
  72.             removeChild(iBackground);
  73.          }
  74.          _loc1_ = new _gs337.BG() as Sprite;
  75.          _loc1_.scaleX = _rs402.prStage.stageWidth / _loc1_.width;
  76.          _loc1_.scaleY = _rs402.prStage.stageHeight / _loc1_.height;
  77.          _loc1_.x -= _rs402._ru276 * _rs402._oy577;
  78.          _loc1_.y -= _rs402._ob68 * _rs402._oy577;
  79.          this.iBackground = _tk11._ev532(_loc1_);
  80.          addChildAt(iBackground,0);
  81.       }
  82.       
  83.       public function _ug618() : void
  84.       {
  85.       }
  86.       
  87.       protected function onResize(param1:Event) : void
  88.       {
  89.          var _loc2_:_be548 = null;
  90.          var _loc3_:TextField = null;
  91.          var _loc4_:int = 0;
  92.          var _loc5_:_oo505 = null;
  93.          var _loc6_:Sprite = null;
  94.          _rs402._be412();
  95.          if(this.iWindow)
  96.          {
  97.             iWindow._dx150();
  98.             this.removeChild(iWindow);
  99.             this.iWindow = null;
  100.             if(!_cg33._ss555)
  101.             {
  102.                this.menuItem = _gs337.miEnterName;
  103.             }
  104.             else
  105.             {
  106.                menuItem = _gs337.miMenu;
  107.             }
  108.             this._ug618();
  109.          }
  110.          if(_rs402.iDebug)
  111.          {
  112.             _loc2_ = new _be548();
  113.             _loc2_.graphics.clear();
  114.             _loc2_.graphics.lineStyle(2,16777215);
  115.             _loc2_.graphics.drawRect(0,0,640 * _rs402._oy577,480 * _rs402._oy577);
  116.             _loc2_.graphics.lineStyle(1,16777215,0.4);
  117.             _loc4_ = 0;
  118.             while(_loc4_ < 480 / 30)
  119.             {
  120.                _loc3_ = new TextField();
  121.                _loc3_.text = (_loc4_ * 30).toString();
  122.                _loc3_.x = 0;
  123.                _loc3_.y = (_loc4_ * 30 + 2) * _rs402._oy577;
  124.                _loc2_.graphics.moveTo(0,_loc4_ * 30 * _rs402._oy577);
  125.                _loc2_.graphics.lineTo(640 * _rs402._oy577,_loc4_ * 30 * _rs402._oy577);
  126.                _loc2_.addChild(_loc3_);
  127.                _loc4_++;
  128.             }
  129.             _loc4_ = 0;
  130.             while(_loc4_ < 640 / 30)
  131.             {
  132.                _loc3_ = new TextField();
  133.                _loc3_.text = (_loc4_ * 30).toString();
  134.                _loc3_.y = 0;
  135.                _loc3_.x = (_loc4_ * 30 + 2) * _rs402._oy577;
  136.                _loc2_.graphics.moveTo(_loc4_ * 30 * _rs402._oy577,0);
  137.                _loc2_.graphics.lineTo(_loc4_ * 30 * _rs402._oy577,480 * _rs402._oy577);
  138.                _loc2_.addChild(_loc3_);
  139.                _loc4_++;
  140.             }
  141.             _loc5_ = _tk11._ev532(_loc2_);
  142.             this.iFrame.bitmapData = _loc5_.bitmapData;
  143.             this.iFrame._vq458 = _loc5_._vq458;
  144.             this.iFrame._vg471 = _loc5_._vg471;
  145.          }
  146.          this.x = (_rs402.prStage.stageWidth - 640 * _rs402._oy577) / 2;
  147.          this.y = (_rs402.prStage.stageHeight - 480 * _rs402._oy577) / 2;
  148.          if(_bu111.iMusic)
  149.          {
  150.             _bu111.iMusic._vq458 = 574;
  151.             _bu111.iSound._vq458 = 604;
  152.             _bu111.iMusic._vg471 = 12;
  153.             _bu111.iSound._vg471 = 12;
  154.             if(speakerMount.parent)
  155.             {
  156.                removeChild(speakerMount);
  157.             }
  158.             _loc6_ = new _gs337.TButtonMount();
  159.             _loc6_.scaleX = 70 / 200;
  160.             _loc6_.scaleY = 36 / 100;
  161.             _loc6_.alpha = 0.5;
  162.             speakerMount = _tk11._ln87(_loc6_);
  163.             speakerMount._xe768(564,5);
  164.             addChild(speakerMount);
  165.             _bu111.iMusic._wy690();
  166.             _bu111.iSound._wy690();
  167.          }
  168.          this._vc572();
  169.          addChild(speakerMount);
  170.          addChild(_bu111.iSound);
  171.          addChild(_bu111.iMusic);
  172.       }
  173.       
  174.       public function onEnterFrame(param1:Event) : void
  175.       {
  176.          var _loc2_:int = 0;
  177.          if(_rs402.iDebug)
  178.          {
  179.             _loc2_ = 1000 / (getTimer() - iTimer);
  180.             iDebugText.text = _loc2_.toString();
  181.             iDebugText.setTextFormat(iDebugTextFormat);
  182.             iTimer = getTimer();
  183.          }
  184.       }
  185.    }
  186. }
  187.  
  188.